package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.dao.BookDao;
import com.woniuxy.entity.Book;
import com.woniuxy.service.BookService;
@Service
public class BookServiceImpl implements BookService{
	
	@Autowired
	BookDao bookDao;
	@Override
	public void insertBook(Book book) {
		bookDao.insertBook(book);
		
	}

	@Override
	public void deleteBookByBid(int bid) {
		bookDao.deleteBookByBid(bid);
	}

	@Override
	public void updateBookByBid(Book book) {
		bookDao.updateBookByBid(book);
		
	}

	@Override
	public List<Book> selectBookAll() {
		List<Book> books=bookDao.selectBookAll();
		return books;
	}

	@Override
	public Book selectBookByBid(int bid) {
		Book findbook=bookDao.selectBookByBid(bid);
		return findbook;
	}

}
